package org.wangzs.blog.aspect;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

public class DynamicDataSource extends AbstractRoutingDataSource {
	
	private static String dataSource;

	public static String getDataSource() {
		return dataSource;
	}

	public static void setDataSource(String dataSource) {
		DynamicDataSource.dataSource = dataSource;
	}

	@Override
	protected Object determineCurrentLookupKey() {
		//return DataSourceSwitcher.getDataSource();
		return dataSource;
	}

}


